package com.jbm.jbmsupplier.zp.FactouryActivity;

/**
 * Created by 家帮忙 on 2017/7/11.
 *
 * 工厂类  来接收保存
 *          群的信息
 *         或
 *          好友信息
 */

public class FacturyActivity {
    private MyNewText myNewText=null;
    private MyNewFile myNewFile=null;
    private MyNewFileau myNewFileau=null;
    private MyNewpay myNewpay=null;
    public FacturyActivity() {
    }
    public ChatSaveMessage setAllData(int tag){
   if (tag==8){//文本
       if (myNewText==null){
           myNewText=new MyNewText();
       }
       return myNewText;
   }else if (tag==10){//图片
       if (myNewFile==null){
           myNewFile=new MyNewFile();
       }
       return myNewFile;
   }else if (tag==12){//语音
       if (myNewFileau==null){
           myNewFileau=new MyNewFileau();
       }
       return myNewFileau;
   }else if (tag==14){//支付
       if (myNewpay==null){
           myNewpay=new MyNewpay();
       }
       return myNewpay;
   }
return null;
    }







}
